The Main Functions:// CPP program to demonstrate working of STL stack #include #include using namespace std;
void showstack(stack s) { while (!s.empty()) { // That means the stack isn't empty. cout << 't' << s.top(); s.pop(); } cout << 'n'; } int main () { stack s; s.push(10); s.push(30); s.push(20); s.push(5); s.push(1); cout << "The stack is : "; showstack(s); cout << "ns.size() : " << s.size(); cout << "ns.top() : "
برچسب:
نویسنده: یلدا صفری